<?php

namespace app\models;

use app\libs\XCaptcha;
use app\services\AdminService;

/**
 * Class Article
 *
 */
class Article extends BaseModel
{
	/**
     * @inheritdoc
     */
    public static function tableName()
    {
        return "{{%article}}";
    }
    /**
     * @inheritdoc
     * 场景
     */
    public function scenarios()
    {
        $scenarios = parent::scenarios();//本行必填，不写的话就会报如上错误  
        
        $scenarios['update'] = ['title','intro','content','type_id','admin_id','create_time','status_is','update_time'];
        return $scenarios;
        
    }
    /**
     * 验证规则
     * @return array
     */
    public function rules()
    {
        return [
            
            [['title','intro','content','type_id','admin_id','create_time','status_is','update_time'], 'safe'],
            
        ];
    }

    /**
     * 字段标签名
     * @return array
     */
    public function attributeLabels()
    {
        return [
            'username'   => '',
            'passWord'   => '',
            'verifyCode' => '',
        ];
    }
}